import request from '@/utils/request'

export const LineApi = {
  /**
     *  线路组分页列表
     * @returns
     */
  getPage: (data) => {
    return request({
      url: '/manage/intercity/line/getPage',
      data,
      method: 'post'
    })
  },

  /**
     *  线路组列表
     * @returns
     */
  getList: () => {
    return request({
      url: '/manage/intercity/line/getList',
      method: 'get'
    })
  },

  /**
     *  更新排序
     * @returns
     */
  updateSort: (data) => {
    return request({
      url: '/manage/intercity/line/updateSort',
      data,
      method: 'post'
    })
  },
  /**
     *  更新状态
     * @returns
     */
  updateStatus: (data) => {
    return request({
      url: '/manage/intercity/line/updateStatus',
      data,
      method: 'post'
    })
  },
  /**
     *  删除
     * @returns
     */
  delete: (lineId) => {
    return request({
      url: '/manage/intercity/line/delete',
      params: { lineId },
      method: 'get'
    })
  },

  /**
     *  获取详细信息
     * @returns
     */
  getInfoById: (lineId) => {
    return request({
      url: '/manage/intercity/line/getInfoById',
      params: { lineId },
      method: 'get'
    })
  },

  /**
     *  更新
     * @returns
     */
  update: (data) => {
    return request({
      url: '/manage/intercity/line/update',
      data,
      method: 'post'
    })
  },

  /**
     *  插入
     * @returns
     */
  insert: (data) => {
    return request({
      url: '/manage/intercity/line/insert',
      data,
      method: 'post'
    })
  }
}
